<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>栏目管理</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link rel="stylesheet" href="http://cdn.bootcss.com/twitter-bootstrap/3.0.3/css/bootstrap.min.css">
    <script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="http://cdn.bootcss.com/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script>
	<style>
		.n1{
			margin-left:100px;
		}
	</style>
	</head>
  <body>
  <nav class="navbar navbar-default">
  <div class="container-fluid">
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
    </div>
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav">
        <li><a href="lists.html" class="btn btn-primary btn-lg">管理栏目</a></li>
        <li><a href="add.html">添加栏目</a></li>
        <li><a href="#addd.php">添加单网页</a></li>
        <li><a href="link.html">添加外部链接</a></li>
        <li><a href="#up.php">更新栏目缓存</a></li>
        <li><a href="#update.php">更新统计栏目数据</a></li>
        <li><a href="#editor.php">批量编辑</a></li>
      </ul>
    </div>
  </div>
  </nav>
 </body>
</html>
<?php
header("content-type:text/html;charset=utf-8");
require("config.php");//包含数据库连接文件

$select_sql = "SELECT * FROM high_level";
$result = mysql_query($select_sql);
$row = mysql_fetch_array($result);

$sql = "SELECT * FROM article";
$res = mysql_query($sql);
$row1 = mysql_fetch_array($res);

$select = "SELECT * FROM middle_level";
$ru = mysql_query($select);
$row2 = mysql_fetch_array($ru);

$s_ql = "SELECT * FROM elementary_level";
$re = mysql_query($s_ql);
$row3 = mysql_fetch_array($re);
?>
<html>
	<head>
	 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap -->
    <link rel="stylesheet" href="http://cdn.bootcss.com/twitter-bootstrap/3.0.3/css/bootstrap.min.css">
	<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
    <script src="http://cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
    <!-- Include all compiled plugins (below), or include individual files as needed -->
    <script src="http://cdn.bootcss.com/twitter-bootstrap/3.0.3/js/bootstrap.min.js"></script>
	<style>
	.zww
	{
	margin-top:65px;
	}
	</style>
</head>
<body>
	<div class="page-header" align="center">
	</div>
	<div class="container">
		<div class="row" style="margin-top:30px">
			<div class="col-sm-4">
		     </div>
	    </div>
			<form class="form zww" method="post" action="column.php">
			<div  class="col-md-12" align="center" >
			<table  class="table table-striped table-condensed">
				<tr>
					<th>排序</th>
					<th>id</th>
					<th>文章标题</th>
					<th>栏目名称</th>
					<th>栏目类型</th>
					<th>所属模型</th>
					<th>管理操作</th>
				</tr>
				<tr>
					<td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
					<td><?php echo $row1["id"];?></td>
					<td><?php echo $row1["title"];?></td>
					<td><?php echo $row3["elementary_name"];?></td>
					<td><?php echo $row2["middle_name"];?></td>
					<td><?php echo $row["high_name"];?></td>
					<td>
					<a href="edit.html?id=<?php echo $row['id']?>">管理子栏目</a>
					<a href="add3.html?id=<?php echo $row['id']?>">添加子栏目</a>
					<a href="xiugai.php?id=<?php echo $row['id']?>">修改</a>
					<a href="delete.php?id=<?php echo $row['id']?>">删除</a>
					</td>
				</tr>
			</table>
			</form>
			</div>
		</div>
	</div>
</body>

</html>
